/*
 * Project Name spring-boot-tools
 * File Name JobManagerController
 * Package Name com.huxiaosu.tools.quartz.controller
 * Create Time 2024/7/29
 * Create by name：liujie
 */
package com.huxiaosu.tools.quartz.controller;

import com.huxiaosu.tools.common.annotation.ToolsController;
import com.huxiaosu.tools.common.base.R;
import com.huxiaosu.tools.mybatis.base.controller.BaseController;
import com.huxiaosu.tools.quartz.dto.JobDetailsDto;
import com.huxiaosu.tools.quartz.entity.JobDetails;
import com.huxiaosu.tools.quartz.service.JobService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * Description
 *
 * @author liujie
 * @date 2024/7/29 13:23
 */
@ToolsController("jobManager")
public class JobManagerController extends BaseController<JobService, JobDetailsDto, JobDetails> {

    @GetMapping("start/{jobId}")
    public R<?> startOrStopJob(@PathVariable Integer jobId){
        super.baseService.startOrStopJob(jobId);
        return R.success();
    }
}